main() {
   var father = Man();
   father.zhengqian();
   var mother = Women();
   mother.huaqian();
   var self = Child();
   self.huaqian();
}

class Person {
  eat() {
    print('我在吃饭');
  }

  drink() {
    print('我在喝水');
  }
}

class Man extends Person with Zhengqian{
 
}

class Women extends Person with Huaqian {
 
}

class Child extends Person with Huaqian {
  
}
// 把一些各个类都可能用的方法抽离出来，通过mixin进行声明成混入的类，再声明类的时候可以通过with进行混入

mixin Zhengqian {
    zhengqian(){
      print('我在挣钱');
    }
}
mixin Huaqian {
   huaqian(){
    print('我在花钱');
  }
}